<template>
	<Tabs>
		<TabPane label="储值管理">
			<Form ref="form" :model="formData" label-position="top" :rules="rules">
				<FormDescItem label="储值最低金额" desc="设置用户自定义储值的最低金额，最低不能低于0.01">
					<InputNumber />
				</FormDescItem>
				<FormDescItem label="结算时是否默认使用余额抵扣" desc="结算时默认不使用余额抵扣时，需用户手动选择">
					<RadioGroup>
				        <Radio label="不可抵扣"></Radio>
				        <Radio label="可抵扣"></Radio>
				    </RadioGroup>
				</FormDescItem>
				<FormDescItem label="固定储值金额" desc="如设置固定储值金额，用户可以直接点击进行充值">
					<InputTags v-model="formData.money"></InputTags>
				</FormDescItem>
				<FormItem>
					<Button type="primary" :loading="committing" @click="handleSubmit">保存设置</Button>
				</FormItem>
			</Form>
		</TabPane>
	</Tabs>
</template>

<script>
import Util from '@/libs/util.js';
import FormDescItem from '@/components/form/FormDescItem.vue';
import InputTags from '@/components/form/InputTags.vue';
export default {
	components: {
		FormDescItem,
		InputTags
	},
	data() {
		return {
			committing: false,
			formData: {
				name: '',
				money: [50, 100, 150, 200]
			},
			rules: {
				
			}
		}
	},
	mounted() {
		this.init();
	},
	methods: {
		init() {
			
		},
		handleSubmit() {
			if(this.committing) return false;
			this.$refs.form.validate(valid => {
                if(valid) {
                	
                }
            });
		}
	}
}
</script>